<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<%@ page import="com.msmall.community.space.util.SpaceConstants" language="java"%>
<c:set var="SPACE_WIDGET_PART_FOOTERPRINT" value="<%=SpaceConstants.SPACE_WIDGET_PART_FOOTERPRINT%>"></c:set>

<div class="spaw220 fl">
	<div class="spaw220nav">
		<p class="fl sHBff">我的脚印</p>
	</div>
	<div id="footerprint_tab_nav" class="spalistfoot">
		<a id="footerprint_tab_nav_1" class="spalistfoota" href="javascript:footerprintTab(1)">我的发帖</a>
		<a id="footerprint_tab_nav_2" href="javascript:footerprintTab(2)">我的提问</a>
	</div>
</div>
<div id="footerprint_tab_content" class="spaw730">
	
</div>
<script>
$(document).ready(function(){
	footerprintTab(1);
});
function footerprintTab(idNo, pi){
	if(!pi){
		pi="";
	}
	var usr='<c:out value="${userInfo.userid}"/>';
	var url = "";
	if(idNo == 1){
		url = '<c:url value="/footerprint/topic.do"/>';
	}
	if(idNo == 2){
		url = '<c:url value="/footerprint/question.do"/>';
	}
	
	$.ajax({
		type : "POST",
		url : url,
		data: "usr="+usr+"&pi="+pi,
		timeout:20000,
		success : function(data){
			$('#footerprint_tab_content').html(data);
		},
		error: function(){
		}
	});
	
	$("#footerprint_tab_nav a").each(function(index, ele){
		if($(this).attr('id') == ('footerprint_tab_nav_'+idNo)){
			$(this).addClass('spalistfoota');
			$(this).removeClass('');
		}else{
			$(this).addClass('');
			$(this).removeClass('spalistfoota');
		}
	});
}
</script>